package com.jsmile.cloud.authc.api.res;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.jsmile.cloud.authc.api.enums.DeptTypeEnum;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel
public class ResSysDept {

    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "部门名称")
    private String deptName;
    @ApiModelProperty(value = "部门地址")
    private String deptAddress;
    @ApiModelProperty(value = "部门电话")
    private String deptPhone;
    @ApiModelProperty(value = "类型 1公司  2公司领导 3部门  4团队或组织")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer deptType;
    @ApiModelProperty(value = "上级部门")
    private Long parentId;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    @ApiModelProperty(value = "更新时间")
    private java.util.Date updateTime;
    @ApiModelProperty(value = "租户id")
    private Long tenantId;
    @ApiModelProperty(value = "create_by")
    private String createBy;
    @ApiModelProperty(value = "update_by")
    private String updateBy;
    @TableLogic
    @ApiModelProperty(value = "是否删除")
    private Integer delFlag;

    public String getDeptTypeName() {
        return DeptTypeEnum.nameOf(this.getDeptType());
    }
}
